#ifndef STUDYREGISTERWIDGET_H
#define STUDYREGISTERWIDGET_H

#include <QWidget>
class WListSourceModel;
class SortFilterProxyModel;
class WlistTableView;
class WLScpThread;

namespace Ui {
class StudyRegisterWidget;
}

class StudyRegisterWidget : public QWidget
{
    Q_OBJECT

public:
    explicit StudyRegisterWidget(QWidget *parent = 0);
    ~StudyRegisterWidget();

protected slots:
    void onWlistToday();
    void onWlistThisWeek();
    void onWlistThisMonth();
    void onWlistClear();
    //void onWlistDoubleClicked(const QModelIndex &index);

    void onNewPatient();
    void onNewStudy(const QModelIndex &index);
    void onChangeStudy(const QModelIndex &index);
    void onRemoveStudy(const QModelIndex &index);

    void onFromDateChecked(bool checked);
    void onToDateChecked(bool checked);
    void onColumnCustomise();

private:
    void init();
    void createConnections();
    void setPermissions();

    Ui::StudyRegisterWidget *ui;
    WListSourceModel *sourceModel;
    WlistTableView *wlistView;
    SortFilterProxyModel *proxyModel;
    WLScpThread *wlScpThread;
};

#endif // STUDYREGISTERWIDGET_H
